<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateStaffTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('staff', function (Blueprint $table) {
            $table->id();
            $table->string('name')->comment('员工姓名');
            $table->string('introduce')->comment('员工介绍');
            $table->boolean('sex')->default(false)->comment('性别：男-》true,女-》false');
            $table->string('preview')->nullable()->comment('图片');
            $table->text('experience')->nullable()->comment('工作经验');
            $table->boolean('gold')->default(false)->comment('金牌员工');
            $table->unsignedSmallInteger('year')->default(1)->comment('工作年限');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('staff');
    }
}
